<template>
  <div class="vant-tilte">
    <p class="text">{{title}}</p>
    <div class="line" v-if="border"></div>
  </div>
</template>

<script>
  export default {
    name: "vanTitle",
    props: {
      title: {
        type: String,
        default: ''
      },
      border: {
        type: Boolean,
        default: true
      }
    }
  }
</script>

<style scoped lang="less">
  .vant-tilte {
    margin-top: 40px;

    .text {
      font-size: 18px;
      font-weight: bold;
      color: #000000;
      line-height: 22px;
      text-align: center;
    }

    .line {
      width: 38px;
      height: 2px;
      background: #98040C;
      margin: 10px auto 0;
    }
  }
</style>
